package com.ihmp.business;

import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ihmp.dao.HotelDAO;
import com.ihmp.model.Thotels;

@Service
@Transactional
public class HotelService {
	@Autowired
	private HotelDAO hotelDAO;
	
	@Transactional
	public void add(Thotels hotel){
		hotelDAO.add(hotel);
	}
	
	@Transactional
	public void update(Thotels hotel){
		hotelDAO.update(hotel);
	}
	
	public void delete(Integer id){
		hotelDAO.delete(id);
	}
	
	public Thotels get(Integer id){
		return hotelDAO.get(id);
	}
	
	public List<Thotels> list(){
		return hotelDAO.list();
	}
	
	public LinkedHashMap<Integer,String> map(){
		return hotelDAO.map();
	}
}
